package com.mytest.provider.es.mapper;


import com.myrest.provider.poi.work.entities.user.ESUser;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;



/**
 * 继承ElasticsearchRepository，就能自动具有crud的操作功能
 * @Author: llq
 * @Date: 2020/4/8
 */
public interface ElasticRepository extends ElasticsearchRepository<ESUser, Long>{
    //默认的注释
    //@Query("{\"bool\" : {\"must\" : {\"field\" : {\"content\" : \"?\"}}}}")


//    @Query("{\"bool\" : {\"must\" : {\"field\" : {\"firstCode.keyword\" : \"?\"}}}}")
//    Page<ESUser> findByFirstCode(String firstCode, Pageable pageable);
//
//    @Query("{\"bool\" : {\"must\" : {\"field\" : {\"secordCode.keyword\" : \"?\"}}}}")
//    Page<ESUser> findBySecordCode(String secordCode, Pageable pageable);

//    List<ESUser> findBySexBetween(double v, double v1);

//    Page<ESUser> findByContent(String content, Pageable pageable);
}
